/**
 * Customer.java
 * A simple class that stores all information about a customer.
 * 
 * @author yongyuwang
 */

package refactoredBankSystem;

public class Customer {
	/**
	 * The name of the customer.
	 */
	private String fName;
	/**
	 * The street name of the customer.
	 */
	private String fStreet;
	/**
	 * The town name.
	 */
	private String fTown;
	/**
	 * The zipcode.
	 */
	private String fZipCode;
	/**
	 * The country name.
	 */
	private String fCountry;
	
	/**
	 * Constructor for customer class.
	 * @param name	The name of the customer.
	 * @param street	The street name.
	 * @param zipCode	The zip code.
	 * @param town	The town name.
	 * @param country	The country name.
	 */
	public Customer(final String name, final String street, final String zipCode, 
			final String town, final String country) {
		fName = name;
		fStreet = street;
		fZipCode = zipCode;
		fTown = town;
		fCountry = country;
	}
	
	/**
	 * Gets the name of the customer.
	 * @return	the name of the customer.
	 */
	public String getName() {
		return fName;
	}
	
	/**
	 * Gets the street name.
	 * @return	the street name.
	 */
	public String getStreet() {
		return fStreet;
	}
	
	/**
	 * Gets the zipcode.
	 * @return	the zipcode.
	 */
	public String getZipCode() {
		return fZipCode;
	}
	
	/**
	 * Gets the town name.
	 * @return	the town name.
	 */
	public String getTown() {
		return fTown;
	}
	
	/**
	 * Gets the country name.
	 * @return the country name.
	 */
	public String getCountry() {
		return fCountry;
	}
	
	/**
	 * Sets the name of the customer.
	 * @param the name to set.
	 */
	public void setName(String name) {
		fName = name;
	}
	
	/**
	 * Sets the street name.
	 * @param street	the street name
	 */
	public void setStreet(String street) {
		fStreet = street;
	}
	
	/**
	 * Sets the zipcode.
	 * @param zipCode	the zipcode.
	 */
	public void setZipCode(String zipCode) {
		fZipCode = zipCode;
	}
	
	/**
	 * Sets the town name
	 * @param town	the town name
	 */
	public void setTown(String town) {
		fTown = town;
	}
	
	/**
	 * Sets the country name.
	 * @param country	the country name.
	 */
	public void setCountry(String country) {
		fCountry = country;
	}
	
	/**
	 * Checks if customers are equivalent.
	 */
	public boolean equals(Object o)
	{
		if(fName == ((Customer)o).getName())
			return true;
		else
			return false;			
	}
}
